<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="jstl" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String realPath = this.getServletContext().getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>首页</title>
</head>
<jsp:include page='<%="/header"%>' />
<body style="top: 200px; position: absolute;">
	<jstl:if test="${user == null }">
		<a href="<%=realPath%>/user/login">登陆</a>
		<a href="<%=realPath%>/user/register">注册</a>
	</jstl:if>
	<jstl:if test="${user != null }">
		<a href="<%=realPath%>/user/logout">注销</a>
		<a href="<%=realPath%>/sysindex">后台</a>
	</jstl:if>
	<a href="<%=realPath%>/article/add">添加文章</a>
	<a href="<%=realPath%>/type">类别列表</a>
	<a href="<%=realPath%>/lable">标签列表</a>
	<br />

	<!-- 	迭代文章Info -->
	<jstl:forEach items="${articleInfos }" var="info">
		<font style="color: red"><a
			href='<%=realPath%>/article/${info.articleId }'>${info.title }</a></font>
		<a href='<%=realPath%>/article/remove/${info.articleId }'>删除</a>
		<a href='<%=realPath%>/article/update/${info.articleId }'>修改</a>
		<a href='<%=realPath%>/article/addTo/${info.articleId }'>追加</a>
		<br />
		<font style="color: green">${info.beviaryContent }</font>
		<br />

	</jstl:forEach>
	<jsp:include page='<%="/footer"%>' />
</body>
</html>